package com.bbc.entity.comment;

public enum CommentTypeEnum {

	PRODUCT(1, "商品");

	private int key;
	private String name;

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	CommentTypeEnum(int key, String name) {
		this.key = key;
		this.name = name;
	}
	
	public static String getCommentTypeName(int key) {
		for (CommentTypeEnum t : CommentTypeEnum.values()) {
            if (key == t.getKey()) {
                return t.getName();
            }
        }
        return null;
	}

}
